package com.nineclock.document.controller;

import com.nineclock.common.entity.Result;
import com.nineclock.document.DocControllerApi;
import com.nineclock.document.service.DocService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping
public class DocController implements DocControllerApi {
    @Autowired
    private DocService docService;

    @Override
    @PutMapping("/{id}/{status}")
    public Result putDocStatus(@PathVariable Long id, @PathVariable Short status) {
        docService.updateDocStatus(id,status);
        return Result.success();
    }
}
